• The Note and LogMSG operators can have the second parameter (like in ARA): if the value is 2 or 3, the message is shown in the LineShare panel, if the value is 1 or 3, the message is written into the LineShare Log.
LineShare 1.5
–––––––––––––––––––––––––––
• All comment lines started with "!$" are shown in the "Comment" field when the script is selected in the "Attach" dialog box.
• The parameters should be defined in the script (the previous versions had the ^2,^3 and ^4 built-in parameters only). A parameter is described with a script line starting with the parameter identifier:
n - defines the parameter ID, should a digit (from 2 to 9, the ^1 is reserved for the dialing string).
<parameter name> - the title string to be shown in the Options dialog box;
<parameter type> - one of: TEXT, BOOL, ENUM
a TEXT parameter is shown as a text field in the Options dialog box. A user can assign any string value to such a parameter;
a BOOL parameters is shown as a pair of radio buttons in the Options dialog box.
a ENUM parameters is shown as a pop-up menu in the Options dialog box.
<parameter values>- a list of valid parameter values:
this list contains elements separated with commas and enclosed with parenthesis; each element consists of two strings separated with the equal sign:
Sample: ("Never"="0","1 Ring"="1","2 Rings"="2")
for TEXT parameters this list should be omitted;
for BOOL parameters the list should contain 2 elements, the first string in each element defines the name of the radio button, the second string is assigned to the parameter if the button is selected; if the list is ommited, the default one is used:
("On"="1","Off"="0")
for ENUM parameters the list elements define pop-up menu items: the first string is used as the item text, the second string is assigned to the parameter is the item is selected.
<default value> - a string assigned to the parameter when a script is initially attached to the line.
Sample:
^5 Fax Identifier: = Text "Stalker_GmbH"
A text field titled "Fax identifier" appears is the Options dialog box. Initially the string "Stalker_GmbH" is assigned to this parameter.
A pop-up menu titled "Speaker On:" appears in the Options dialog box. It has three items: "Never","When Connecting", "Always". Selecting one of these items results in the value "0", "1", or "2" is assigned to the parameter ^2. Initially "1" is assigned.
• The wildcard combination ^$ is implemented. If met in a match string (i.e. in a MatchStr operator), this combination matches any string in the input stream:
i.e. if the input stream is:
CONNECT 9600/V42bis
and a match string is defined as:
MatchStr 1 10 "CONNECT ^$/"
then script will jump to the lable 10, and the "9600" is assigned to ^$
When used in other operators, ^$ can be used to access the substring it has just compared.
Sample:
Note "Connected at ^$bps"
• The Say command is implemented:
Say <string>
It brings up a Notification Alert Box with the <string> message.
• Variables:
you can use several (5 in this version) variables in strings. To substitute the variable content, you should write the carret sign and the variable name - a capital letter (^A,^B,^C,^D,^E).
To assign a value to a variable, use the SETVAR command:
SETVAR <variable_name> <string>
Sample: SetVar B "Normal"
Note "^B Connection Established"
This results in the "Normal Connection Established" message.
• Calculation:
Everywhere in a script, except the "@Label" lines you can use a combination:
VAL(<string>) instead of a number.
Sample:
SetVar A "96"
SetSpeed VAL("^A00")
This results in switching the serial port speed to 9600 bps.
The digits in the string can have leading and trailing spaces.
Note: it means that you can use "calculated jump" as well:
i.e. Jump Val("^A") is a legal operation.
• Error codes: LineShare now shows the error code, if an error occured when executing a script.
There is the list of the error codes:
-6003 Jsr/return stack overflow
-6015 Undefined label
-6016 Unknown Script Command
-6017 Unexpected End of Script File.
-6018 Illegal MatchString index
-6025 Error in syntax
-6026 Error in number
-6027 String too long
-6028 Parameter/variable is not defined
-6052 Too long string in QueueInput
LineShare 2.1
–––––––––––––––––––––––––––
• IfStr now works with script variables, not only parameters
• Reset(2400) disconnect detector is now supported (for supporting FaxSTF Class 1 driver). The subport is disconnected if the SerReset command is sent through that port and the speed field in the SerReset call is set to 2400.
LineShare 2.2
–––––––––––––––––––––––––––––
• IfOpen "<port name>" <label>
operator allows to check if a subport is open with an application. Jumps to
the label <label> if the port named <port name> is open.
• SetInfo <number> "string"
This operator stores the "string" so it is returned by a modem emulator in response to the ATIn command, when is equal to <number>. For example, after
SetInfo 9 "123-456"
is executed, and an application sends the "ATI9" command through the port (attached to modem emulator), the "123-456" is sent back to the application.
• SetSReg <number> <value>
Like SetInfo stores the numeric <value> into the emulator's S-reghisters. This value will be returned with the modem emulator when an application sends a "ATSn?" command, where n is equal to <number>
Example: after the
SetSReg 27 155
has been executed, and an application sends the "ATS27?" command, the number 155 is sent back in response.
LineShare 3.0
-------------------------
The modem specifications files are added. They can be placed either into the "LineShare Scripts" folder or into the "Modems" folder inside the System Folder.
Each file should contain one 'STR#' resource with ID number 128. That resource should contain string pairs: the first one is the option name (four capital letters), the second is the option value.
To make LineShare ask for a modem specification file, include the following line into the script:
^# <title>
Example:
^# Modem:
• GetOption <variable name> <option name> <label>
The operator puts the value of the option <option name> (from the modem specification file) into the variable <variable name>. If no modem specification file is in use or the option is absent in the specification file, the script jumps to the label <label>
Example:
GetOption A "HWHS" 3
It takes the HWHS string (AT command for hardware handshaking) from the modem specification file and puts that string into the variable A. If the string is not found, the script continues from the label 3.
The operator takes the AT-command <command name> from the modem emulator on the port <port name> and puts this string into the variable <variable name>.
The AT commands an application sends to the serial ports created with LineShare are processed with the built-in LineShare emulator, but they are stored in the emulator buffer aas well. This command can retrive those commands from the application buffer. If no such command was sent to that port, an empty string is put into the variable.
Example:
GetCommand A "Fax" "L"
If an application working with the "Fax" port has sent a ATL4 command to the port (i.e. to the modem emulator), this operator will put the string "L4" into the variable A.
The operator takes the value of the S-register <register number> from the modem emulator on the port <port name> and places the value (as the binary 1-char string) into the variable <variable name>.